<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <c:if test="${msg!=null}">
        <script type="text/javascript">
            var msg = "${msg}"
            alert(msg);
        </script>
    </c:if>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <link rel="stylesheet" type="text/css" href="css/global.css"/>

    <title> dg | 搜索结果 | 微博</title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <link rel="shortcut icon" href=""/>
    <link rel="stylesheet" type="text/css" media="all" href=" testJs/style.css"/>
    <link rel="stylesheet" type="text/css" media="all" href=" testJs/mo.css"/>
    <script type="text/javascript" src=" testJs/jquery.js"></script>
    <script type="text/javascript" src=" testJs/touchslide.js"></script>
    <script type="text/javascript" src=" script/profile.js"></script>
    <script type="text/javascript" src="script/ajax.js"></script>
    <script type="text/javascript" src="script/friend.js"></script>
</head>
<body class="bg">

<!-- header开始-->
<%@include file="header.jsp" %>
<!-- header结束-->
<!-- container 开始-->
<div id="header" style="padding-top: 30px">
    <div class="wrapper">
        <div class="nav fl">
            <a href="javascript:;" class="nav-m"><i class="mo-menu"></i></a>
            <div class="logo fl">
                <h1><a href="http://localhost/wordpress" title="微博搜索结果"><img src=""/></a></h1>
            </div>
            <ul class="menu fr">
                <div class="menu">
                    <ul>
                        <li class=""><a href="http://localhost/wordpress/sample-page/">搜索页面</a></li>
                    </ul>
                </div>
            </ul>
        </div>
        <div class="tool fr">
            <a href="/publish" target="_blank"><i class="mo-pencil"></i>发布</a>
            <a class="sogin" href="login" target="_blank"><i class="mo-user"></i>登录</a>
            <a class="sch" href="javascript:;" target="_blank"><i class="mo-search"></i>搜索</a>
        </div>
    </div>
</div>
<div id="banner">
    <div class="wrapper clearfix">
        <span class="iclose fr"><i class="mo-cancel-circled-outline"></i></span>
        <div class="search zhenghei">
            <form action="search?ac=weibo&pag=1" method="post" id="form1" name="form1">
                <input name="key" id="search" class="st fl" value="请输入关键词搜索..."
                       onblur="if (this.value == '') {this.value = '请输入关键词搜索...';}"
                       onfocus="if (this.value == '请输入关键词搜索...') {this.value = '';}" type="text">
                <button value="" class="but fr" type="submit"><i class="mo-search"></i></button>
            </form>
        </div>
    </div>
</div>
<div id="content">
    <div class="wrapper">
        <div class="site">
            <i class="mo-home"></i><a itemprop="breadcrumb" href="http://localhost:8081/weibo/home">首页</a>
            <b>&raquo;</b> <span class="cur">搜索: ${key}</span></div>
        <div class="main fl">
            <div class="list w750">
                <h3 class="h3">搜索结果</h3>
                <div class="post-list fl mt15">
                    <c:if test="${map.rows==null}">
                        <div>对不起，没找到你搜索内容。</div>
                    </c:if>
                    <c:if test="${map.rows!=null}">
                        <c:forEach items="${map.rows}" var="weibo">
                            <div class="post-info">
                                <div class="pic fl">
                                    <a target="_blank">
                                        <c:if test="${weibo.mImage != 'null'}">

                                            <img src="${weibo.mImage}" id="${weibo.mId}"
                                                 onclick="imgAct(${weibo.mId})" height="160px" width="230px"/>
                                        </c:if>
                                        <c:if test="${weibo.mImage == 'null'}">
                                            <img src="${weibo.user.images}" height="160px" width="230px"/>
                                        </c:if>
                                    </a>
                                </div>
                                <c class="post-content w490 fr">
                                    <div class="post-tit">

                                    </div>
                                    <div class="post-artice">
                                        <img src="${weibo.user.images}" width="50"
                                             height="50"/></td>
                                        <span style="width:88%" class="content"><a
                                                href="userIndex?userId=${weibo.user.id}">${weibo.user.nickName}</a><img
                                                src="icon/v.gif"
                                                width="11"
                                                height="10"
                                                align="middle"/><br>
                                        </span>
                                            ${weibo.mBody}
                                    </div>
                                    <div class="post-in">
                                        <span>${weibo.publishTime}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
                                        <span id="like${weibo.mId}" onclick="like(${weibo.mId})" style="cursor:pointer">
                                            <c:if test="${weibo.b==false}">赞(${weibo.mLike})</c:if>
                                            <c:if test="${weibo.b==true}">已赞(${weibo.mLike})</c:if>
 &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                        </span>
                                        <span id="trans${weibo.mId}" onclick="trans(${weibo.mId})"
                                              style="cursor:pointer">
                                            转发(${weibo.mTranum})

                                        </span>

                                        <span id="coll${weibo.mId}" onclick="coll(${weibo.mId})" style="cursor:pointer">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;收藏</span>
                                        <a class="fr" href="http://localhost/wordpress/2019/04/26/微博/"
                                           target="_blank">more+</a>

                                    </div>
                                </c>
                            </div>
                        </c:forEach>
                    </c:if>

                </div>
            </div>
            <span style="float: right" id="userinfo">
            <ul>
                <li align="right">
                    <c:if test="${pageNum!=1}">
                        <a href="home?pageNum=${pageNum-1}" style="text-decoration:none">上一页</a>&nbsp; &nbsp;
                    </c:if>
                    第&nbsp; ${pageNum} &nbsp;页 &nbsp;&nbsp;
                    <c:if test="${pageNum <pageTotal+1}">
                        <a href="home?pageNum=${pageNum+1}" style="text-decoration:none">下一页</a>
                    </c:if>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    共 &nbsp; ${pageTotal+1} &nbsp;页
                </li>
            </ul>

    </span>
        </div>
        <div class="sidebar w320 fr">
            <div id="localtime"><font>2019-04-26 18:27:30 星期五</font></div>
            <jsp:include page="userinfo.jsp"/>
        </div>
    </div>


    <!-- container 结束-->


    <!--footer开始-->
    <%@include file="footer.jsp" %>
    <!--footer结束-->
</div>

<script type="text/javascript" src="testJs/slide.js "></script>
<script type="text/javascript" src="testJs/online.js "></script>
</body>
</html>